{php include wl_template('common/header');}
<ul class="nav nav-tabs" id="myTab">
    <li><a href="javascript:;">佣金明细</a></li>
</ul>
<div class="app-content">
   <div class="app-filter">
		<div class="filter-list">
            <form action="" method="get" class="form-horizontal" role="form" id="form1">
                <input type="hidden" name="c" value="site" />
                <input type="hidden" name="a" value="entry" />
                <input type="hidden" name="m" value="{MODULE_NAME}" />
                <input type="hidden" name="p" value="salesman" />
                <input type="hidden" name="ac" value="salesman" />
                <input type="hidden" name="do" value="details" />
                <input type="hidden" name="ordertype" value="{$_GPC['ordertype']}" />
                <div class="form-group max-with-all">
                	<label class="col-sm-2 control-label">订单类型</label>
					<div class="col-sm-9">
						<div class="btn-group">
							<a href="{php echo wl_filter_url('ordertype:');}" class="btn {if $_GPC['ordertype'] == ''}btn-primary{else}btn-default{/if}">不限</a>
							<a href="{php echo wl_filter_url('ordertype:rush');}" class="btn {if $_GPC['ordertype'] == 'rush'}btn-primary{else}btn-default{/if}">抢购订单</a>
							<a href="{php echo wl_filter_url('ordertype:groupon');}" class="btn {if $_GPC['ordertype'] == 'groupon'}btn-primary{else}btn-default{/if}">团购订单</a>
							<a href="{php echo wl_filter_url('ordertype:fightgroup');}" class="btn {if $_GPC['ordertype'] == 'fightgroup'}btn-primary{else}btn-default{/if}">拼团订单</a>
							<a href="{php echo wl_filter_url('ordertype:coupon');}" class="btn {if $_GPC['ordertype'] == 'coupon'}btn-primary{else}btn-default{/if}">超级券订单</a>
                            <a href="{php echo wl_filter_url('ordertype:bargain');}" class="btn {if $_GPC['ordertype'] == 'bargain'}btn-primary{else}btn-default{/if}">砍价订单</a>
                            <a href="{php echo wl_filter_url('ordertype:payonline');}" class="btn {if $_GPC['ordertype'] == 'payonline'}btn-primary{else}btn-default{/if}">在线买单</a>
                            <a href="{php echo wl_filter_url('ordertype:citydelivery');}" class="btn {if $_GPC['ordertype'] == 'citydelivery'}btn-primary{else}btn-default{/if}">同城配送</a>
                        </div>
					</div>
                </div>
                <div class="form-group form-inline">
					<label class="col-sm-2 control-label">关键字</label>
                    <div class="col-sm-9">
                        <select name="keywordtype" class="form-control">
                            <option value="">关键字类型</option>
                            <option value="1" {if $_GPC['keywordtype']==1}selected="selected"{/if}>业务员MID</option>
                            <option value="2" {if $_GPC['keywordtype']==2}selected="selected"{/if}>业务员昵称</option>
                            <option value="5" {if $_GPC['keywordtype']==5}selected="selected"{/if}>店家SID</option>
                            <option value="6" {if $_GPC['keywordtype']==6}selected="selected"{/if}>店家名称</option>
                            <option value="3" {if $_GPC['keywordtype']==3}selected="selected"{/if}>金额大于</option>
                            <option value="4" {if $_GPC['keywordtype']==4}selected="selected"{/if}>金额小于</option>
                        </select>
                        <input type="text" name="keyword" class="form-control" value="{$_GPC['keyword']}"  placeholder="请输入关键字"/>
                    </div>
                </div>
                <div class="form-group">
					<label class="col-sm-2 control-label">时间</label>
                    <div class="col-sm-9">
                        {php echo tpl_select_time_info('time_limit', array('starttime' => date('Y-m-d',$starttime), 'endtime' => date('Y-m-d', $endtime)));}
                    </div>
                </div>
                <div class="form-group">
					<label class="col-sm-2 control-label"></label>
					<div class="col-sm-9">
                  		<button class="btn btn-primary" id="search">筛选</button>
						<button class="btn btn-default" name="exportflag" type="submit" value="export"><i class="fa fa-download"></i> 导出</button>
					</div>
				</div>
            </form>
        </div>
    </div>
    <script type="text/javascript">
        $("#search").click(function(){
            $('#form1')[0].submit();
        });
    </script>
    <div class="app-table-list">
        <div class="table-responsive">
            <table class="table table-hover">
                <thead class="navbar-inner">
                    <tr>
                        <th style="width:5%;">MID</th>
                        <th style="width:15%;">业务员姓名</th>
                        <th style="width:10%;">收支</th>
                        <th style="width:10%;">金额</th>
                        <th style="width:10%;">来源</th>
                        <th style="width:15%;">描述</th>
                        <th style="width:25%;">时间</th>
                        <th style="width:10%;">订单</th>
                    </tr>
                </thead>
                <tbody>
                    {loop $details $de}
                    <tr>
                        <td>{$de['leadid']}</td>
                        <td>{$de['leadname']}</td>
                        <td><span {if $de['type'] == 1} class="label label-success" {else} class="label label-danger" {/if} >{$de['typetext']}</span></td>
                        <td style="color: red;">{$de['price']}</td>
                        <td>{$de['buyname']}</td>
                        <td>
                            {$de['pluginname']}
                            {if $de['checkcode']}
                            <br/>核销码:{$de['checkcode']}
                            {/if}
                        </td>
                        <td>{$de['createtime']}</td>
                        <td>{if $de['orderurl']}<a class="btn btn-primary btn-sm" target="_blank" href="{$de['orderurl']}">查看</a>{/if}</td>
                    </tr>
                    {/loop}
                </tbody>
            </table>
        </div>
        <div class="app-table-foot clearfix">
			<div class="pull-left">
				
			</div>
			<div class="pull-right">
				{$pager}
			</div>
		</div>
    </div>
    <style>
        .change:hover{
            cursor:pointer;
        }
    </style>
</div>
{php include wl_template('common/footer');}